home *** CD-ROM | disk | FTP | other *** search
/ Geek 6 / Geek-006.iso / mac / mmjb102Mac.hqx / MusicMatch JukeBox 1.02 / Help / bsscdht1.js < prev    next >
Text File  |  2000-07-13  |  31KB  |  893 lines

  1. //////////BSSCDHTML Section 1//////////
  2. // RoboHELP« Dynamic HTML Effects Script
  3. // Copyright ⌐ 1998-1999 Blue Sky Software Corporation.  All rights reserved.
  4.  
  5. // Version=3.56
  6.  
  7. // Warning:  Do not modify this file.  It is generated by RoboHELP« and changes will be overwritten.
  8.  
  9. //{{HH_SYMBOL_SECTION
  10. var HH_ChmFilename = "";
  11. var HH_WindowName = "";
  12. var HH_GlossaryFont = "";
  13. var HH_Glossary = "";
  14. var HH_Avenue = "";
  15. var HH_ActiveX = false;
  16. //}}HH_SYMBOL_SECTION
  17.  
  18. var gbNav4 = false;
  19. var gbIE4 = false;
  20. var gbIE = false;
  21. var gbIE5 = false;
  22. var gAgent = navigator.userAgent.toLowerCase(); 
  23. var gbMac = (gAgent.indexOf("mac") != -1);
  24. var gbWindows = ((gAgent.indexOf("win") != -1) || (gAgent.indexOf("16bit") != -1));
  25.  
  26. var error_count = 0;
  27.  
  28. gbIE = (navigator.appName.indexOf("Microsoft") != -1);
  29. if (parseInt(navigator.appVersion) >= 4) {
  30.     gbNav4 = (navigator.appName == "Netscape");
  31.     gbIE4 = (navigator.appName.indexOf("Microsoft") != -1);
  32.  
  33.     if (gbIE4) {
  34.         if (gAgent.indexOf("msie 5.0") != -1) {
  35.             gbIE5 = true;
  36.         }
  37.     }
  38. }
  39.  
  40. function HHActivateComponents()
  41. {
  42.     if (HH_ActiveX && (HH_ChmFilename != "") && ((self == top) || (self == top.frames[0])))
  43.     {
  44.         var objBody = document.all.tags("BODY")[0];
  45.         objBody.insertAdjacentHTML("beforeEnd", '<OBJECT ID="HHComponentActivator" CLASSID="CLSID:399CB6C4-7312-11D2-B4D9-00105A0422DF" width=0 height=0></OBJECT>');
  46.         if (HHComponentActivator.object)
  47.         {
  48.             HHComponentActivator.Activate(HH_ChmFilename, HH_WindowName, HH_GlossaryFont, HH_Glossary, HH_Avenue);
  49.         }
  50.     }
  51. }
  52.  
  53. var gAmc = new Array();
  54. var BSSCSequenceIndex = 0;
  55.  
  56. function animationContext(el, progressAnimation, finishAnimiation, animationDuration, animationPeriod)
  57. {
  58.     this.el = el;
  59.     this.progressAnimation = progressAnimation;
  60.     this.finishAnimiation = finishAnimiation;
  61.     this.animationDuration = parseFloat(animationDuration);
  62.     this.animationPeriod = animationPeriod;
  63.     this.animationStartTime = (new Date()).getTime();
  64.     this.continueAnimation = true;
  65. }
  66.  
  67. function progressFade(ndx)
  68. {
  69.     percent = ((new Date()).getTime() - gAmc[ndx].animationStartTime)/gAmc[ndx].animationDuration;
  70.     if (percent > 1.0){
  71.         percent = 1.0;
  72.         gAmc[ndx].continueAnimation = false;
  73.     }
  74.     gAmc[ndx].el.filters.alpha.opacity = gAmc[ndx].initialOpacity*(1.0-percent) +  gAmc[ndx].finalOpacity*percent;
  75. }
  76.  
  77. function finishFade(ndx)
  78. {
  79.     gAmc[ndx].el.filters.alpha.opacity = parseInt(gAmc[ndx].finalOpacity);
  80. }
  81.  
  82. function progressTranslation(ndx)
  83. {
  84.     percent = ((new Date()).getTime() - gAmc[ndx].animationStartTime)/gAmc[ndx].animationDuration;
  85.     if (percent > 1.0)    {
  86.         percent = 1.0;
  87.         gAmc[ndx].continueAnimation = false;
  88.     }
  89.     gAmc[ndx].el.style.pixelLeft = gAmc[ndx].startX*(1.0-percent) +  gAmc[ndx].finalX*percent;
  90.     gAmc[ndx].el.style.pixelTop = gAmc[ndx].startY*(1.0-percent) +  gAmc[ndx].finalY*percent;
  91. }
  92. function progressSpiral(ndx)
  93. {
  94.     percent = ((new Date()).getTime() - gAmc[ndx].animationStartTime)/gAmc[ndx].animationDuration;
  95.     if (percent > 1.0)    {
  96.         percent = 1.0;
  97.         gAmc[ndx].continueAnimation = false;
  98.     }
  99.     rf = 1.0 - percent
  100.     t = percent * 2.0*Math.PI
  101.     rx = Math.max(Math.abs(gAmc[ndx].el.initLeft), 200)
  102.     ry = Math.max(Math.abs(gAmc[ndx].el.initTop),  200)
  103.     gAmc[ndx].el.style.pixelLeft = Math.ceil(-rf*Math.cos(t)*rx)
  104.     gAmc[ndx].el.style.pixelTop  = Math.ceil(-rf*Math.sin(t)*ry)
  105.     gAmc[ndx].el.style.visibility="visible"    
  106. }
  107.  
  108. function progressElasticFromRight(ndx)
  109. {
  110.     percent = ((new Date()).getTime() - gAmc[ndx].animationStartTime)/gAmc[ndx].animationDuration;
  111.     if (percent > 1.0)    {
  112.         percent = 1.0;
  113.         gAmc[ndx].continueAnimation = false;
  114.     }
  115.     rf=Math.exp(-percent*7)
  116.     t = percent * 1.5*Math.PI
  117.     rx =Math.abs(gAmc[ndx].el.initLeft)
  118.     gAmc[ndx].el.style.pixelLeft = rf*Math.cos(t)*rx
  119.     gAmc[ndx].el.style.pixelTop = 0
  120.     gAmc[ndx].el.style.visibility="visible"    
  121. }
  122. function progressElasticFromBottom(ndx)
  123. {
  124.     percent = ((new Date()).getTime() - gAmc[ndx].animationStartTime)/gAmc[ndx].animationDuration;
  125.     if (percent > 1.0)    {
  126.         percent = 1.0;
  127.         gAmc[ndx].continueAnimation = false;
  128.     }
  129.     rf=Math.exp(-percent*7)
  130.     t = percent * 1.5*Math.PI
  131.     rx =Math.abs(gAmc[ndx].el.initTop)
  132.     gAmc[ndx].el.style.pixelLeft = 0
  133.     gAmc[ndx].el.style.pixelTop = rf*Math.cos(t)*rx
  134.     gAmc[ndx].el.style.visibility="visible"    
  135. }
  136.  
  137. function progressZoomIn(ndx)
  138. {
  139.     percent = ((new Date()).getTime() - gAmc[ndx].animationStartTime)/gAmc[ndx].animationDuration;
  140.     if (percent > 1.0)    {
  141.         percent = 1;
  142.         gAmc[ndx].continueAnimation = false;
  143.     }
  144.     for (var index=0; index<gAmc[ndx].el.all.length; index++) {
  145.         gAmc[ndx].el.all[index].style.fontSize = Math.ceil(50+50*percent) + "%"
  146.     }
  147.     gAmc[ndx].el.posLeft = 100
  148.     gAmc[ndx].el.style.visibility="visible"
  149.  
  150.     if (percent >= 1.0)    {
  151.         finishZoom(ndx);
  152.     }
  153. }
  154.  
  155. function progressZoomOut(ndx)
  156. {
  157.     percent = ((new Date()).getTime() - gAmc[ndx].animationStartTime)/gAmc[ndx].animationDuration;
  158.     if (percent > 1.0)    {
  159.         percent = 1.0;
  160.         gAmc[ndx].continueAnimation = false;
  161.     }
  162.  
  163.     for (var index=0; index<gAmc[ndx].el.all.length; index++)
  164.         gAmc[ndx].el.all[index].style.fontSize = Math.ceil(100+200*(1-percent)) + "%"
  165.     gAmc[ndx].el.posLeft = 0
  166.     gAmc[ndx].el.style.visibility="visible"
  167.  
  168.     if (percent >= 1.0)    {
  169.         finishZoom(ndx);
  170.     }
  171. }
  172. function finishTranslation(ndx)
  173. {
  174.     gAmc[ndx].el.style.pixelLeft = parseInt(gAmc[ndx].finalX);
  175.     gAmc[ndx].el.style.pixelTop = parseInt(gAmc[ndx].finalY);
  176. }
  177. function finishZoom(ndx)
  178. {
  179.     for (i=0; i<gAmc[ndx].el.all.length; i++)
  180.         gAmc[ndx].el.all[i].style.fontSize = gAmc[ndx].OldFont
  181.  
  182.  
  183. function animationPump(ndx)
  184. {
  185.     gAmc[ndx].progressAnimation(ndx);
  186.     if (gAmc[ndx].continueAnimation)
  187.         gAmc[ndx].tm = setTimeout("animationPump(" + ndx + ");", gAmc[ndx].animationPeriod);
  188. }
  189.  
  190. function clearAnimations()
  191. {
  192.     for (var index=0; index<gAmc.length; index++) {
  193.         gAmc[index].finishAnimiation(index);
  194.         clearTimeout(gAmc[index].tm);
  195.     }
  196.     gAmc = new Array();
  197. }
  198.  
  199. function startNextAnimationSet()
  200. {
  201.     clearAnimations();
  202.     bStarted = false;
  203.     bFound = false
  204.  
  205.     // Determine the next sequence number
  206.     divElements = document.all.tags("DIV");
  207.     for (var index = 0; index < divElements.length; index++) 
  208.     {
  209.         el = divElements[index];
  210.         objectOrder = el.getAttribute("BSSCObjectOrder", false);
  211.         if(null != objectOrder)
  212.         {
  213.             objectOrder = parseInt(objectOrder);
  214.             if (objectOrder > BSSCSequenceIndex && (!bFound || objectOrder < minBSSCSequenceIndexFound))
  215.             {
  216.                 minBSSCSequenceIndexFound = objectOrder;
  217.                 bFound = true;
  218.             }
  219.         }
  220.     }
  221.  
  222.     if (bFound)
  223.     {
  224.         BSSCSequenceIndex = minBSSCSequenceIndexFound;
  225.         bStarted = startAnimationSet(BSSCSequenceIndex);
  226.     }
  227. }
  228.  
  229. function getOffsetFromTopOfBrowser(el)
  230. {
  231.     if (null == el.offsetParent)
  232.         return el.offsetTop;
  233.     else
  234.         return el.offsetTop + getOffsetFromTopOfBrowser(el.offsetParent);
  235. }
  236.  
  237. function startAnimationSet(ndx)
  238. {
  239.     var m = 0;
  240.     bStarted = false;
  241.  
  242.     // Find document elements with "BSSCAnimationType" attribute
  243.     divElements = document.all.tags("DIV");
  244.     for (var index = 0; index < divElements.length; index++)
  245.     {
  246.         el = divElements[index];
  247.         
  248.         animationType = el.getAttribute("BSSCAnimationType", false);
  249.         if(null != animationType)
  250.         {
  251.             framePeriod = el.getAttribute("BSSCFramePeriod", false);
  252.             frameCount = el.getAttribute("BSSCFrameCount", false);
  253.             sequenceIndex = el.getAttribute("BSSCObjectOrder", false);
  254.  
  255.             // Stop any currently running RevealTrans filters
  256.             if ("RevealTrans" == animationType && parseInt(sequenceIndex) == ndx-1 && gbWindows)
  257.                 el.filters.RevealTrans.stop();  
  258.             // Filter on ndx
  259.             if (0 == ndx && null == sequenceIndex ||
  260.                 ndx == parseInt(sequenceIndex))
  261.             {
  262.                 if ("FlyInFromRight" == animationType)
  263.                 {
  264.                     animationDuration = el.getAttribute("BSSCDuration", false);
  265.                     if (null == animationDuration)
  266.                         animationDuration = 1000; // default to 1s
  267.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  268.                     gAmc[m].startX = document.body.clientWidth + document.body.scrollLeft;
  269.                     gAmc[m].startY = 0;
  270.                     gAmc[m].finalX = 0;
  271.                     gAmc[m].finalY = 0;
  272.                     animationPump(m++);
  273.                     bStarted = true;
  274.                 }
  275.                 if ("FlyOutToRight" == animationType)
  276.                 {
  277.                     animationDuration = el.getAttribute("BSSCDuration", false);
  278.                     if (null == animationDuration)
  279.                         animationDuration = 1000; // default to 1s
  280.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  281.                     gAmc[m].startX = 0;
  282.                     gAmc[m].startY = 0;
  283.                     gAmc[m].finalX = document.body.clientWidth + document.body.scrollWidth;
  284.                     gAmc[m].finalY = 0;
  285.                     animationPump(m++);
  286.                     bStarted = true;
  287.                 }
  288.                 if ("FlyInFromLeft" == animationType)
  289.                 {
  290.                     animationDuration = el.getAttribute("BSSCDuration", false);
  291.                     if (null == animationDuration)
  292.                         animationDuration = 1000; // default to 1s
  293.                     for (childIndex=0; childIndex<el.children.length; childIndex++)
  294.                     {
  295.                         if ("left" == el.children[childIndex].style.textAlign)
  296.                             el.children[childIndex].style.textAlign = "right";
  297.                     }
  298.                     pixelsToTranslate = document.body.clientWidth;
  299.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  300.                     gAmc[m].startX = -(document.body.clientWidth + document.body.scrollLeft);
  301.                     gAmc[m].startY = 0;
  302.                     gAmc[m].finalX = 0;
  303.                     gAmc[m].finalY = 0;
  304.                     animationPump(m++);
  305.                     bStarted = true;
  306.                 }
  307.                 if ("FlyOutToLeft" == animationType)
  308.                 {
  309.                     animationDuration = el.getAttribute("BSSCDuration", false);
  310.                     if (null == animationDuration)
  311.                         animationDuration = 1000; // default to 1s
  312.                     for (childIndex=0; childIndex<el.children.length; childIndex++)
  313.                     {
  314.                         if ("left" == el.children[childIndex].style.textAlign)
  315.                             el.children[childIndex].style.textAlign = "right";
  316.                     }
  317.                     pixelsToTranslate = document.body.clientWidth;
  318.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  319.                     gAmc[m].startX = 0;
  320.                     gAmc[m].startY = 0;
  321.                     gAmc[m].finalX = -(document.body.clientWidth + document.body.scrollWidth);
  322.                     gAmc[m].finalY = 0;
  323.                     animationPump(m++);
  324.                     bStarted = true;
  325.                 }
  326.                 if ("FlyInFromBottom" == animationType)
  327.                 {
  328.                     animationDuration = el.getAttribute("BSSCDuration", false);
  329.                     if (null == animationDuration)
  330.                         animationDuration = 1000; // default to 1s
  331.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  332.                     gAmc[m].startX = 0;
  333.                     gAmc[m].startY = document.body.clientHeight + document.body.scrollTop;
  334.                     gAmc[m].finalX = 0;
  335.                     gAmc[m].finalY = 0;
  336.                     animationPump(m++);
  337.                     bStarted = true;
  338.                 }
  339.                 if ("FlyOutToBottom" == animationType)
  340.                 {
  341.                     animationDuration = el.getAttribute("BSSCDuration", false);
  342.                     if (null == animationDuration)
  343.                         animationDuration = 1000; // default to 1s
  344.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  345.                     gAmc[m].startX = 0;
  346.                     gAmc[m].startY = 0;
  347.                     gAmc[m].finalX = 0;
  348.                     gAmc[m].finalY = document.body.clientHeight + document.body.scrollHeight;
  349.                     animationPump(m++);
  350.                     bStarted = true;
  351.                 }
  352.                 if ("FlyInFromTop" == animationType)
  353.                 {
  354.                     animationDuration = el.getAttribute("BSSCDuration", false);
  355.                     if (null == animationDuration)
  356.                         animationDuration = 1000; // default to 1s
  357.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  358.                     gAmc[m].startX = 0;
  359.                     gAmc[m].startY = -getOffsetFromTopOfBrowser(el) - el.offsetHeight;
  360.                     gAmc[m].finalX = 0;
  361.                     gAmc[m].finalY = 0;
  362.                     animationPump(m++);
  363.                     bStarted = true;
  364.                 }
  365.                 if ("FlyOutToTop" == animationType)
  366.                 {
  367.                     animationDuration = el.getAttribute("BSSCDuration", false);
  368.                     if (null == animationDuration)
  369.                         animationDuration = 1000; // default to 1s
  370.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  371.                     gAmc[m].startX = 0;
  372.                     gAmc[m].startY = 0;
  373.                     gAmc[m].finalX = 0;
  374.                     gAmc[m].finalY = -getOffsetFromTopOfBrowser(el) - el.offsetHeight;
  375.                     animationPump(m++);
  376.                     bStarted = true;
  377.                 }
  378.                 if ("FlyInFromBottomRight" == animationType)
  379.                 {
  380.                     animationDuration = el.getAttribute("BSSCDuration", false);
  381.                     if (null == animationDuration)
  382.                         animationDuration = 1000; // default to 1s
  383.                     pixelsToTranslate = document.body.clientWidth + document.body.scrollLeft;
  384.                     if (document.body.clientHeight + document.body.scrollTop - el.offsetTop < pixelsToTranslate)
  385.                         pixelsToTranslate = document.body.clientHeight + document.body.scrollTop - el.offsetTop;
  386.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  387.                     gAmc[m].startX = pixelsToTranslate;
  388.                     gAmc[m].startY = pixelsToTranslate;
  389.                     gAmc[m].finalX = 0;
  390.                     gAmc[m].finalY = 0;
  391.                     animationPump(m++);
  392.                     bStarted = true;
  393.                 }
  394.                 if ("FlyOutToBottomRight" == animationType)
  395.                 {
  396.                     animationDuration = el.getAttribute("BSSCDuration", false);
  397.                     if (null == animationDuration)
  398.                         animationDuration = 1000; // default to 1s
  399.                     pixelsToTranslate = document.body.clientWidth + document.body.scrollLeft;
  400.                     if (document.body.clientHeight + document.body.scrollTop - el.offsetTop < pixelsToTranslate)
  401.                         pixelsToTranslate = document.body.clientHeight +document.body.scrollTop - el.offsetTop;
  402.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  403.                     gAmc[m].startX = 0;
  404.                     gAmc[m].startY = 0;
  405.                     gAmc[m].finalX = pixelsToTranslate;
  406.                     gAmc[m].finalY = pixelsToTranslate;
  407.                     animationPump(m++);
  408.                     bStarted = true;
  409.                 }
  410.                 if ("FlyInFromTopRight" == animationType)
  411.                 {
  412.                     animationDuration = el.getAttribute("BSSCDuration", false);
  413.                     if (null == animationDuration)
  414.                         animationDuration = 1000; // default to 1s
  415.                     pixelsToTranslate = document.body.clientWidth;
  416.                     offsetFromTopOfBrowser = getOffsetFromTopOfBrowser(el);
  417.                     if (offsetFromTopOfBrowser + el.offsetHeight < pixelsToTranslate)
  418.                         pixelsToTranslate = offsetFromTopOfBrowser + el.offsetHeight;
  419.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  420.                     gAmc[m].startX = pixelsToTranslate;
  421.                     gAmc[m].startY = -pixelsToTranslate;
  422.                     gAmc[m].finalX = 0;
  423.                     gAmc[m].finalY = 0;
  424.                     animationPump(m++);
  425.                     bStarted = true;
  426.                 }
  427.                 if ("FlyOutToTopRight" == animationType)
  428.                 {
  429.                     animationDuration = el.getAttribute("BSSCDuration", false);
  430.                     if (null == animationDuration)
  431.                         animationDuration = 1000; // default to 1s
  432.                     pixelsToTranslate = document.body.clientWidth;
  433.                     offsetFromTopOfBrowser = getOffsetFromTopOfBrowser(el);
  434.                     if (offsetFromTopOfBrowser + el.offsetHeight < pixelsToTranslate)
  435.                         pixelsToTranslate = offsetFromTopOfBrowser + el.offsetHeight;
  436.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  437.                     gAmc[m].startX = 0;
  438.                     gAmc[m].startY = 0;
  439.                     gAmc[m].finalX = pixelsToTranslate;
  440.                     gAmc[m].finalY = -pixelsToTranslate;
  441.                     animationPump(m++);
  442.                     bStarted = true;
  443.                 }
  444.                 if ("FlyInFromTopLeft" == animationType)
  445.                 {
  446.                     animationDuration = el.getAttribute("BSSCDuration", false);
  447.                     if (null == animationDuration)
  448.                         animationDuration = 1000; // default to 1s
  449.                     for (childIndex=0; childIndex<el.children.length; childIndex++)
  450.                     {
  451.                         if ("left" == el.children[childIndex].style.textAlign)
  452.                             el.children[childIndex].style.textAlign = "right";
  453.                     }
  454.                     pixelsToTranslate = document.body.clientWidth + document.body.scrollLeft;
  455.                     offsetFromTopOfBrowser = getOffsetFromTopOfBrowser(el);
  456.                     if (offsetFromTopOfBrowser + el.offsetHeight < pixelsToTranslate)
  457.                         pixelsToTranslate = offsetFromTopOfBrowser + el.offsetHeight;
  458.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  459.                     gAmc[m].startX = -pixelsToTranslate;
  460.                     gAmc[m].startY = -pixelsToTranslate;
  461.                     gAmc[m].finalX = 0;
  462.                     gAmc[m].finalY = 0;
  463.                     animationPump(m++);
  464.                     bStarted = true;
  465.                 }
  466.                 if ("FlyOutToTopLeft" == animationType)
  467.                 {
  468.                     animationDuration = el.getAttribute("BSSCDuration", false);
  469.                     if (null == animationDuration)
  470.                         animationDuration = 1000; // default to 1s
  471.                     for (childIndex=0; childIndex<el.children.length; childIndex++)
  472.                     {
  473.                         if ("left" == el.children[childIndex].style.textAlign)
  474.                             el.children[childIndex].style.textAlign = "right";
  475.                     }
  476.                     pixelsToTranslate = document.body.clientWidth + document.body.scrollLeft;
  477.                     offsetFromTopOfBrowser = getOffsetFromTopOfBrowser(el);
  478.                     if (offsetFromTopOfBrowser + el.offsetHeight < pixelsToTranslate)
  479.                         pixelsToTranslate = offsetFromTopOfBrowser + el.offsetHeight;
  480.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  481.                     gAmc[m].startX = 0;
  482.                     gAmc[m].startY = 0;
  483.                     gAmc[m].finalX = -pixelsToTranslate;
  484.                     gAmc[m].finalY = -pixelsToTranslate;
  485.                     animationPump(m++);
  486.                     bStarted = true;
  487.                 }
  488.                 if ("FlyInFromBottomLeft" == animationType)
  489.                 {
  490.                     animationDuration = el.getAttribute("BSSCDuration", false);
  491.                     if (null == animationDuration)
  492.                         animationDuration = 1000; // default to 1s
  493.                     for (childIndex=0; childIndex<el.children.length; childIndex++)
  494.                     {
  495.                         if ("left" == el.children[childIndex].style.textAlign)
  496.                             el.children[childIndex].style.textAlign = "right";
  497.                     }
  498.                     pixelsToTranslate = document.body.clientWidth + document.body.scrollLeft;
  499.                     if (document.body.clientHeight + document.body.scrollTop - el.offsetTop < pixelsToTranslate)
  500.                         pixelsToTranslate = document.body.clientHeight + document.body.scrollTop - el.offsetTop;
  501.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  502.                     gAmc[m].startX = -pixelsToTranslate;
  503.                     gAmc[m].startY = pixelsToTranslate;
  504.                     gAmc[m].finalX = 0;
  505.                     gAmc[m].finalY = 0;
  506.                     animationPump(m++);
  507.                     bStarted = true;
  508.                 }
  509.                 if ("FlyOutToBottomLeft" == animationType)
  510.                 {
  511.                     animationDuration = el.getAttribute("BSSCDuration", false);
  512.                     if (null == animationDuration)
  513.                         animationDuration = 1000; // default to 1s
  514.                     for (childIndex=0; childIndex<el.children.length; childIndex++)
  515.                     {
  516.                         if ("left" == el.children[childIndex].style.textAlign)
  517.                             el.children[childIndex].style.textAlign = "right";
  518.                     }
  519.                     pixelsToTranslate = document.body.clientWidth + document.body.scrollLeft;
  520.                     if (document.body.clientHeight + document.body.scrollTop - el.offsetTop < pixelsToTranslate)
  521.                         pixelsToTranslate = document.body.clientHeight +document.body.scrollTop - el.offsetTop;
  522.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  523.                     gAmc[m].startX = 0;
  524.                     gAmc[m].startY = 0;
  525.                     gAmc[m].finalX = -pixelsToTranslate;
  526.                     gAmc[m].finalY = pixelsToTranslate;
  527.                     animationPump(m++);
  528.                     bStarted = true;
  529.                 }
  530.                 if ("FadeIn" == animationType)
  531.                 {
  532.                     if (gbWindows)
  533.                     {
  534.                         animationDuration = el.getAttribute("BSSCDuration", false);
  535.                         if (null == animationDuration)
  536.                             animationDuration = 1000; // default to 1s
  537.                         finalOpacity = el.getAttribute("BSSCFinalOpacity", false);
  538.                         if (null == finalOpacity)
  539.                             finalOpacity = 100;
  540.                         initialOpacity = el.getAttribute("BSSCInitialOpacity", false);
  541.                         if (null == initialOpacity)
  542.                             initialOpacity = 0;
  543.                         gAmc[m] = new animationContext(el, progressFade, finishFade, animationDuration, 50);
  544.                         el.filters.opacity = initialOpacity;
  545.                         gAmc[m].initialOpacity = initialOpacity;
  546.                         gAmc[m].finalOpacity = finalOpacity;
  547.                         animationPump(m++);
  548.                         bStarted = true;
  549.                     } else {
  550.                         el.style.visibility = "";
  551.                     }
  552.                 }
  553.                 if ("Spiral" == animationType)
  554.                 {
  555.                     animationDuration = el.getAttribute("BSSCDuration", false);
  556.                     if (null == animationDuration)
  557.                         animationDuration = 1000; // default to 1s
  558.  
  559.                     gAmc[m] = new animationContext(el, progressSpiral, finishTranslation, animationDuration, 10);
  560.                     gAmc[m].el.initLeft = el.offsetLeft+document.body.clientWidth;
  561.                     gAmc[m].el.initTop = document.body.scrollTop+el.offsetTop+document.body.clientHeight;
  562.                     gAmc[m].el.endLeft = gAmc[m].el.posLeft;
  563.                     gAmc[m].el.endTop  = gAmc[m].el.posTop;
  564.                     gAmc[m].finalX = 0;
  565.                     gAmc[m].finalY = 0;
  566.                     gAmc[m].steps = 0;
  567.                     animationPump(m++);
  568.                     bStarted = true;
  569.                 }
  570.                 if ("ElasticFromRight" == animationType)
  571.                 {
  572.                     animationDuration = el.getAttribute("BSSCDuration", false);
  573.                     if (null == animationDuration)
  574.                         animationDuration = 1000; // default to 1s
  575.                     gAmc[m] = new animationContext(el, progressElasticFromRight, finishTranslation, animationDuration, 10);
  576.                     gAmc[m].el.initLeft = el.offsetLeft+document.body.clientWidth;
  577.                     gAmc[m].el.initTop = gAmc[m].el.posTop;
  578.                     gAmc[m].el.endLeft = gAmc[m].el.posLeft;
  579.                     gAmc[m].el.endTop  = gAmc[m].el.posTop;
  580.                     gAmc[m].finalX = 0;
  581.                     gAmc[m].finalY = 0;
  582.                     gAmc[m].steps = 0;
  583.                     animationPump(m++);
  584.                     bStarted = true;
  585.                 }
  586.                 if ("ElasticFromBottom" == animationType)
  587.                 {
  588.                     animationDuration = el.getAttribute("BSSCDuration", false);
  589.                     if (null == animationDuration)
  590.                         animationDuration = 1000; // default to 1s
  591.                     gAmc[m] = new animationContext(el, progressElasticFromBottom, finishTranslation, animationDuration, 10);
  592.                     gAmc[m].el.initLeft = gAmc[m].el.posLeft;
  593.                     gAmc[m].el.initTop = document.body.scrollTop-el.offsetTop-el.offsetHeight;
  594.                     gAmc[m].el.endLeft = gAmc[m].el.posLeft;
  595.                     gAmc[m].el.endTop  = gAmc[m].el.posTop;
  596.                     gAmc[m].finalX = 0;
  597.                     gAmc[m].finalY = 0;
  598.                     gAmc[m].steps = 0;
  599.                     animationPump(m++);
  600.                     bStarted = true;
  601.                 }
  602.                 if ("ZoomIn" == animationType)
  603.                 {
  604.                     animationDuration = el.getAttribute("BSSCDuration", false);
  605.                     if (null == animationDuration)
  606.                         animationDuration = 1000; // default to 1s
  607.                     gAmc[m] = new animationContext(el, progressZoomIn, finishZoom, animationDuration, 10);
  608.                     gAmc[m].OldFont = gAmc[m].el.all[0].style.fontSize;
  609.                     animationPump(m++);
  610.                     bStarted = true;
  611.                 }
  612.                 if ("ZoomOut" == animationType)
  613.                 {
  614.                     animationDuration = el.getAttribute("BSSCDuration", false);
  615.                     if (null == animationDuration)
  616.                         animationDuration = 1000; // default to 1s
  617.                     gAmc[m] = new animationContext(el, progressZoomOut, finishZoom, animationDuration, 10);
  618.                     gAmc[m].OldFont = gAmc[m].el.all[0].style.fontSize;
  619.                     animationPump(m++);
  620.                     bStarted = true;
  621.                 }
  622.                 if ("RevealTrans" == animationType)
  623.                 {
  624.                     if (gbWindows) {
  625.                         Duration = el.getAttribute("BSSCDuration", false);
  626.                         if (null == Duration)
  627.                             Duration = 1000; // default to 1s
  628.                         Transition = el.getAttribute("BSSCTransition", false);
  629.                         if (null == Transition)
  630.                             Transition = 0;
  631.                         el.style.filter = "RevealTrans();";
  632.                         el.filters.RevealTrans.Transition = Transition;
  633.                         el.filters.RevealTrans.apply();
  634.                         el.style.visibility = ""; 
  635.                         el.filters.RevealTrans.play(parseInt(Duration)/1000.0);  
  636.                         bStarted = true;
  637.                     } else {
  638.                         el.style.visibility = "";
  639.                     }
  640.                 }
  641.             }
  642.         }
  643.     }
  644.     return bStarted;
  645. }
  646.  
  647. function ApplyTextFormatting(divEl, childEl)
  648. {
  649.     childEl.setAttribute("BSSCOriginalStyle", childEl.style);
  650.  
  651.     // Text Change
  652.     hoverColor = divEl.getAttribute("BSSCHoverColor", false);
  653.     if ("Default" != divEl.getAttribute("BSSCHoverColorName"))
  654.     {
  655.         childEl.setAttribute("BSSCOriginalColor", childEl.style.color);
  656.         childEl.style.color = hoverColor;
  657.     }
  658.     hoverFontName = divEl.getAttribute("BSSCHoverFontName", false);
  659.     if (null != hoverFontName && hoverFontName != "*Default*")
  660.     {
  661.         hoverFontFamily = divEl.getAttribute("BSSCHoverFontFamily", false);
  662.         if (null != hoverFontFamily)
  663.         {
  664.             childEl.setAttribute("BSSCOriginalFontFamily", childEl.style.fontFamily);
  665.             childEl.style.fontFamily = hoverFontFamily;
  666.         }
  667.     }
  668.     hoverFontSize = divEl.getAttribute("BSSCHoverFontSize", false);
  669.     {
  670.         if (null != hoverFontSize && hoverFontSize != "*")
  671.         {
  672.             childEl.setAttribute("BSSCOriginalFontSize", childEl.style.fontSize);
  673.             childEl.style.fontSize = hoverFontSize + "pt";
  674.         }
  675.     }
  676.     hoverFontStyle = divEl.getAttribute("BSSCHoverFontStyle", false);
  677.     if (null != hoverFontStyle && "Regular" != hoverFontStyle)
  678.     {
  679.         if ("Italic" == hoverFontStyle)
  680.         {
  681.             childEl.setAttribute("BSSCOriginalFontStyle", childEl.style.fontStyle);
  682.             childEl.style.fontStyle = "italic";
  683.         }
  684.         else if ("Bold" == hoverFontStyle)
  685.         {
  686.             childEl.setAttribute("BSSCOriginalFontWeight", childEl.style.fontWeight);
  687.             childEl.style.fontWeight = "bold";
  688.         }
  689.         else if ("Bold Italic" == hoverFontStyle)
  690.         {
  691.             childEl.setAttribute("BSSCOriginalFontStyle", childEl.style.fontStyle);
  692.             childEl.style.fontStyle = "italic";
  693.             childEl.setAttribute("BSSCOriginalFontWeight", childEl.style.fontWeight);
  694.             childEl.style.fontWeight = "bold";
  695.         }
  696.     }
  697.     hoverUnderline = divEl.getAttribute("BSSCHoverUnderLine", false);
  698.     if (null != hoverUnderline && hoverUnderline == "TRUE")
  699.     {
  700.         childEl.setAttribute("BSSCOriginalTextDecoration", childEl.style.textDecoration);
  701.         childEl.style.textDecoration = "underline";
  702.     }
  703. }
  704.  
  705. function RemoveTextFormatting(el)
  706. {
  707.     originalColor = el.getAttribute("BSSCOriginalColor", false);
  708.     if (null != originalColor)
  709.         el.style.color = originalColor;
  710.     originalFontFamily = el.getAttribute("BSSCOriginalFontFamily", false);
  711.     if (null != originalFontFamily)
  712.         el.style.fontFamily = originalFontFamily;
  713.     originalFontSize = el.getAttribute("BSSCOriginalFontSize", false);
  714.     if (null != originalFontSize)
  715.         el.style.fontSize = originalFontSize;
  716.     originalFontStyle = el.getAttribute("BSSCOriginalFontStyle", false);
  717.     if (null != originalFontStyle)
  718.         el.style.fontStyle = originalFontStyle;
  719.     originalFontWeight = el.getAttribute("BSSCOriginalFontWeight", false);
  720.     if (null != originalFontWeight)
  721.         el.style.fontWeight = originalFontWeight;
  722.     originalTextDecoration = el.getAttribute("BSSCOriginalTextDecoration", false);
  723.     if (null != originalTextDecoration)
  724.         el.style.textDecoration = originalTextDecoration;
  725. }
  726.  
  727. function BSSCOnMouseOver(el)
  728. {
  729.     // Text Formatting
  730.     hoverColor = el.getAttribute("BSSCHoverColor", false);
  731.     if (null != hoverColor)
  732.         for (var index=0; index<el.all.length; index++)
  733.             ApplyTextFormatting(el, el.all[index]);
  734.  
  735.     // Glow
  736.     glowColor = el.getAttribute("BSSCGlowColor", false);
  737.     if (null != glowColor)
  738.     {
  739.         glowStrength = el.getAttribute("BSSCGlowStrength", false);
  740.         if (null == glowStrength)
  741.             glowStrength = "3";
  742.         glowColorName = el.getAttribute("BSSCGlowColorName");
  743.         if ("Default" == glowColorName)
  744.             el.style.filter = "glow(Strength=" + glowStrength + ", enabled=1)";
  745.         else
  746.             el.style.filter = "glow(Color=#" + glowColor + ", Strength=" + glowStrength + ", enabled=1)";
  747.     }
  748. }
  749.  
  750. function BSSCOnMouseOut(el)
  751. {
  752.     // Text Formatting
  753.     hoverColor = el.getAttribute("BSSCHoverColor", false);
  754.     if (null != hoverColor)
  755.         for (var index=0; index<el.all.length; index++)
  756.             RemoveTextFormatting(el.all[index]);
  757.  
  758.     // Glow
  759.     glowColor = el.getAttribute("BSSCGlowColor", false);
  760.     if (null != glowColor)
  761.         el.style.filter="";
  762. }
  763.  
  764. function doStaticEffects()
  765. {
  766.     divElements = document.all.tags("DIV");
  767.     for (var index = 0; index < divElements.length; index++)
  768.     {
  769.         el = divElements[index];
  770.         
  771.         dropShadowColor = el.getAttribute("BSSCDropShadowColor");
  772.         if (null != dropShadowColor)
  773.         {
  774.             dropShadowXOffset = el.getAttribute("BSSCDropShadowXOffset");
  775.             if (null == dropShadowXOffset)
  776.                 dropShadowXOffset = 0;
  777.             dropShadowYOffset = el.getAttribute("BSSCDropShadowYOffset");
  778.             if (null == dropShadowYOffset)
  779.                 dropShadowYOffset = 0;
  780.             dropShadowColorName = el.getAttribute("BSSCDropShadowColorName");
  781.             if ("Default" == dropShadowColorName)
  782.                 el.style.filter = "DropShadow(OffX=" + dropShadowXOffset + ", OffY=" + dropShadowYOffset + ")";
  783.             else
  784.                 el.style.filter = "DropShadow(Color=" + dropShadowColor + ", OffX=" + dropShadowXOffset + ", OffY=" + dropShadowYOffset + ")";
  785.         }
  786.     }
  787. }
  788.  
  789. function drop( targetId )
  790.     target = document.all( targetId );
  791.     if (target.style.display == 'none') {
  792.        target.style.display = "" ;
  793.     } else {
  794.        target.style.display = "none";
  795.     }
  796.     event.cancelBubble = true;
  797. }
  798.  
  799. function checkParent(src,dest)
  800. {
  801.     //Search for a specific parent of the current element.
  802.     while(src !=null)
  803.     {
  804.         if(src.tagName == dest)
  805.         {
  806.             return src;
  807.         }
  808.         src = src.parentElement;
  809.     }
  810.     return null;
  811. }
  812.  
  813. //Generic Display code
  814. function outline2()
  815. {
  816.     //Expand or collapse if a list item is clicked.
  817.     var open = event.srcElement;
  818.  
  819.     //Verify that the tag which was clicked was either the 
  820.     //trigger tag or nested within a trigger tag.
  821.     var el = checkParent(open,"CITE");
  822.     if(null != el)
  823.     {    
  824.         var incr=0;
  825.         var elmPos = 0;
  826.         var parentSpan;
  827.         var fBreak
  828.  
  829.         //Get the position of the element which was clicked
  830.         elemPos = window.event.srcElement.sourceIndex;
  831.  
  832.         //Search for a SPAN tag
  833.         for (parentSpan = window.event.srcElement.parentElement; parentSpan!=null;    parentSpan = parentSpan.parentElement) 
  834.         {
  835.             //test if already at a span tag 
  836.             if (parentSpan.tagName=="SPAN") {
  837.                 incr=1;
  838.                 break;
  839.             }
  840.             
  841.             //Test if the tag clicked was in a body tag or in any of the possible kinds of lists
  842.             //we perform this test because nested lists require special handling
  843.             if (parentSpan.tagName=="BODY" || parentSpan.tagName=="UL" || parentSpan.tagName=="OL") 
  844.             {
  845.                 //Determine where the span to be expanded is.  
  846.                 for (incr=1; (elemPos+incr) < document.all.length; incr++)
  847.                 {    
  848.                     //verify we are at an expandable Div tag
  849.                     if(document.all(elemPos+incr).tagName=="SPAN" && (document.all(elemPos+incr).className=="expanded" || document.all(elemPos+incr).className=="glossexpanded" || document.all(elemPos+incr).className=="glosscollapsed" || document.all(elemPos+incr).className=="collapsed"))
  850.                     {
  851.                         fBreak=1;
  852.                         break;
  853.                     }
  854.                     else if(document.all(elemPos+incr).tagName=="LI")
  855.                     {
  856.                         //If the next tag following the list item (li) is another list item(li) return in order to prevent accidentally opening the next span in the list
  857.                         return;
  858.                     }
  859.                 }
  860.             }
  861.             //determine if we need to break out of the while loop (kind of a kludge since theres no goto in javascript)
  862.             if(fBreak==1)
  863.             {
  864.                 break;
  865.             }
  866.         }
  867.     }
  868.     else
  869.     {
  870.         return;
  871.     }
  872.  
  873.     //Now that we've identified the span, expand or collapse it
  874.     if(document.all(elemPos+incr) == null) {    
  875.         return;
  876.     } else if(document.all(elemPos+incr).className=="collapsed") {
  877.         document.all(elemPos+incr).className="expanded";
  878.     } else if(document.all(elemPos+incr).className=="expanded")  {
  879.         document.all(elemPos+incr).className="collapsed";
  880.     } else if(document.all(elemPos+incr).className=="glosscollapsed") {
  881.         document.all(elemPos+incr).className="glossexpanded";
  882.     } else if(document.all(elemPos+incr).className=="glossexpanded") {
  883.         document.all(elemPos+incr).className="glosscollapsed";
  884.     } else    {
  885.         return;
  886.     }
  887.     event.cancelBubble = true;
  888. }
  889.  
  890.  
  891.